{include file="/shopro/common/script" /}

<div id="team" class="agent-team" v-cloak>
    <el-container class="panel-block">
        <el-header class="sa-header sa-flex sa-flex-wrap mt-4">
            <el-form :inline="true" :model="formInline" class="demo-form-inline">
              <el-form-item label="开始时间">
                <el-date-picker
                  v-model="formInline.start"
                  type="date"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="结束时间">
                <el-date-picker
                  v-model="formInline.end"
                  type="date"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="onSubmit">查询</el-button>
              </el-form-item>
            </el-form>
            <div>
                总计：{{ state.data.total_goods_num }}
            </div>
        </el-header>
        <el-main>
            <el-table class="sa-table" :data="state.data.agent_team">
              <!--<el-table-column prop="user_id" label="ID" min-width="90"></el-table-column>-->
                <el-table-column label="用户" min-width="150">
                    <template #default="scope">
                        <sa-user-profile class="cursor-pointer" :user="scope.row.user" :id="scope.row.user_id" :isHover="false" @click="getTeam(scope.row.user_id)">
                        </sa-user-profile>
                    </template>
                </el-table-column>
                <el-table-column label="SKU数量" min-width="150">
                    <template #default="scope">
                        <div class="sa-flex">
                            {{ scope.row.goods_num }}
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="层级" min-width="150">
                    <template #default="scope">
                        <div class="sa-flex">
                            {{ scope.row.level }}
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="加入时间" min-width="172" align="center">
                    <template #default="scope"> {{ scope.row.createtime }} </template>
                </el-table-column>
            </el-table>
        </el-main>
    </el-container>
</div>
